home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 2⁄16⁄90 / 0654-Re double-clicking-Feb90 < prev    next >
Encoding:
Text File  |  1990-02-16  |  1.1 KB  |  35 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  A33          to A34
  2.  
  3. Item    9861353                         12-Feb-90        21:20PST
  4.  
  5. From:   KEMINK1                         Kemink, Joost
  6.  
  7. To:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    Reply to double-clicking
  10.  
  11. Mark,
  12.  
  13. TIcon.DoMouseCommand is passed the eventInfo parameter. This parameter contains
  14. all the information you need. For example, if you add the following code to the
  15. DemoDialogs example, you will see the results in your transcript window.
  16.  
  17. FUNCTION TRadioIcon.DoMouseCommand(VAR theMouse:Point;VAR info:EventInfo;
  18.    VAR hysteresis:Point):TCommand; OVERRIDE;
  19. BEGIN
  20.    {$IFC qDebug}
  21.    Writeln('clickCount: ',info.theClickCount:1);
  22.    Writeln('optionKey: ',info.theOptionKey);
  23.    {$ENDC qDebug}
  24.    DoMouseCommand:=INHERITED DoMouseCommand(theMouse,info,hysteresis);
  25. END;
  26.  
  27. You could override DoMouseCommand and store the status of the option key and
  28. the clickcount in a field of your overridden icon. Then, at DoChoice time you
  29. can access the status and the number of clicks again.
  30.  
  31. Hope this helps,
  32.  
  33. Joost Kemink
  34.  
  35.